package cn.zysuyuan.item.service.impl;

import cn.zysuyuan.common.entity.PageResult;
import cn.zysuyuan.item.entity.Medicinal;
import cn.zysuyuan.item.entity.MedicinalInf;
import cn.zysuyuan.item.mapper.WxMedicinalMapper;
import cn.zysuyuan.item.service.WxMedicinalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author flypig
 * @version 1.0
 * @date 2019-12-12 1:59
 */
@Service
public class WxMedicinalServiceImpl implements WxMedicinalService {

    @Autowired
    private WxMedicinalMapper wxMedicinalMapper;

    @Override
    public PageResult<MedicinalInf> select(String mName) {

        List<MedicinalInf> medicinalInfs = this.wxMedicinalMapper.select(mName);
        return new PageResult<MedicinalInf>(medicinalInfs);
    }

    @Override
    public PageResult<MedicinalInf> selectDetail(String id) {
        List<MedicinalInf> medicinalInfs = this.wxMedicinalMapper.selectDetail(id);
        return new PageResult<MedicinalInf>(medicinalInfs);
    }
}
